<?php

namespace catchAdmin\pc\tables\forms;

use catcher\library\form\Form;

class Banner extends Form
{
    public function fields(): array
    {
        return [
            Form::input('title', '名称')->required()->placeholder('请输入名称'),
            Form::images('图片', 'image')->field('img'),
            Form::date('from_date', '显示开始日期'),
            Form::date('to_date', '显示结束日期'),
            Form::select('type', '位置')->setOptions(tableSelectArray((new \catchAdmin\model\Banner())->getTypeList()))->valueKey('type'),
        ];
    }

}
